class CommentController < ApplicationController
def search
@comments = Comment.search_facebook(params[:comment_keyword]))
@title= "RESULTS"

def comment.search_facebook (keyword)
search= facebookinterface.new
results = search.find_by_keyword(keyword)
return comment.convert_facebook_results(results)
end

def comment.convert_facebook_results(results)
converted_comment = Array.new
results.each do |result|
comment.message = result.message.to_s
converted_comment.push(comment)
end
return converted_comment
end
